<!DOCTYPE html>
<html>
<head>
	<title>JSON string</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlxcombo.css"/>
	<script src="../../../codebase/dhtmlxcombo.js"></script>
	<script>
		
		var myCombo, myCombo2, myCombo3;
		function doOnLoad() {
			
			// JSON string
			myCombo = new dhtmlXCombo("combo_zone");
			myCombo.load('{options:['+
						'{value: "1", text: "Copenhagen Airport"},'+
						'{value: "2", text: "Dublin Airport", selected: true},'+
						'{value: "3", text: "Frankfurt Airport"}'+
					']}');
			
			// JSON string with image
			myCombo2 = new dhtmlXCombo("combo_zone2", null, null, "image");
			myCombo2.setImagePath("../common/flags/");
			myCombo2.load('{options:['+
						'{value: "1", img: "austria.png", text: "Austria"},'+
						'{value: "2", img: "cameroon.png", text: "Cameroon"},'+
						'{value: "3", img: "canada.png", text: "Canada", selected: true}'+
					']}');
			
			// JSON string with checkbox
			myCombo3 = new dhtmlXCombo("combo_zone3", null, null, "checkbox");
			myCombo3.load('{options:['+
						'{value: "1", text: "The Adventures of Tom Sawyer"},'+
						'{value: "2", text: "The Dead Zone", selected: true, checked: true},'+
						'{value: "3", text: "The First Men in the Moon", checked: true}'+
					']}');
		}
	</script>
</head>
<body onload="doOnLoad();">
	<h3>JSON string</h3>
	<div id="combo_zone" style="width:230px;"></div>
	<br>
	<h3>JSON string with image</h3>
	<div id="combo_zone2" style="width:230px;"></div>
	<br>
	<h3>JSON string with checkbox</h3>
	<div id="combo_zone3" style="width:230px;"></div>
</body>
</html>
